package at.socialconference.web.servlets;

import java.io.IOException;
import java.io.OutputStream;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import at.socialconference.web.server.util.QRCodeHelper;

public class QRCodeServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	public void doGet(HttpServletRequest request, HttpServletResponse response)	throws ServletException, IOException{
		OutputStream outputStream = response.getOutputStream();
		
		String data = request.getParameter("message");
		data = data.replace("bb", "#");
		QRCodeHelper.encode(data, outputStream);
	}

}
